package singleton;

/**
 * @author cbf4Life cbf4life@126.com I'm glad to share my knowledge with you
 *         all. 通用单例模式
 */
@SuppressWarnings("all")
public class SingletonPattern1 {
	private static final SingletonPattern1 singletonPattern1 = new SingletonPattern1();

	// 限制住不能直接产生一个实例
	private SingletonPattern1() {
	}

	public synchronized static SingletonPattern1 getInstance() {
		return singletonPattern1;
	}
}
